<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <p>1</p>
    <p>2</p>
    <p>3</p>

    <script src="../js/jq.js"></script>
    <script>

        // 
        // function GetEle(ele) {
        //     if (typeof ele === 'string') {
        //         this.eles = document.querySelectorAll(ele);
        //     } else {
        //         this.eles = ele;
        //     }

        // }


        $('p').on('click', function () {
            // console.log(this.index());
            console.log($(this).index())
        })

    </script>

</body>

</html>